package cn.iocoder.yudao.module.handguard.dal.mysql.userbasetable8;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.handguard.dal.dataobject.userbasetable8.UserBaseTable8DO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.handguard.controller.app.userbasetable8.vo.*;

/**
 * 商业商住楼写字楼厂房一抵押 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface UserBaseTable8Mapper extends BaseMapperX<UserBaseTable8DO> {

    default PageResult<UserBaseTable8DO> selectPage(UserBaseTable8PageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<UserBaseTable8DO>()
                .eqIfPresent(UserBaseTable8DO::getUserId, reqVO.getUserId())
                .eqIfPresent(UserBaseTable8DO::getArea, reqVO.getArea())
                .eqIfPresent(UserBaseTable8DO::getLandTypes, reqVO.getLandTypes())
                .eqIfPresent(UserBaseTable8DO::getBuildingStructure, reqVO.getBuildingStructure())
                .eqIfPresent(UserBaseTable8DO::getHouseType, reqVO.getHouseType())
                .eqIfPresent(UserBaseTable8DO::getAreaOfStructure, reqVO.getAreaOfStructure())
                .eqIfPresent(UserBaseTable8DO::getLocation, reqVO.getLocation())
                .eqIfPresent(UserBaseTable8DO::getLocationFloor, reqVO.getLocationFloor())
                .eqIfPresent(UserBaseTable8DO::getRent, reqVO.getRent())
                .eqIfPresent(UserBaseTable8DO::getOddCorpus, reqVO.getOddCorpus())
                .betweenIfPresent(UserBaseTable8DO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(UserBaseTable8DO::getId));
    }

    default List<UserBaseTable8DO> selectList(UserBaseTable8ExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<UserBaseTable8DO>()
                .eqIfPresent(UserBaseTable8DO::getUserId, reqVO.getUserId())
                .eqIfPresent(UserBaseTable8DO::getArea, reqVO.getArea())
                .eqIfPresent(UserBaseTable8DO::getLandTypes, reqVO.getLandTypes())
                .eqIfPresent(UserBaseTable8DO::getBuildingStructure, reqVO.getBuildingStructure())
                .eqIfPresent(UserBaseTable8DO::getHouseType, reqVO.getHouseType())
                .eqIfPresent(UserBaseTable8DO::getAreaOfStructure, reqVO.getAreaOfStructure())
                .eqIfPresent(UserBaseTable8DO::getLocation, reqVO.getLocation())
                .eqIfPresent(UserBaseTable8DO::getLocationFloor, reqVO.getLocationFloor())
                .eqIfPresent(UserBaseTable8DO::getRent, reqVO.getRent())
                .eqIfPresent(UserBaseTable8DO::getOddCorpus, reqVO.getOddCorpus())
                .betweenIfPresent(UserBaseTable8DO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(UserBaseTable8DO::getId));
    }

}
